package com.zhang.springcloud.controller;

import com.zhang.springcloud.domain.CommonResult;
import com.zhang.springcloud.service.AccountService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.math.BigDecimal;

@RestController
public class AccountController {
    @Resource
    private AccountService as;
    @PostMapping("/account/decrease")
    public CommonResult decrease(Long user_id, BigDecimal money){
        as.update(user_id,money);
        return new CommonResult(200,"账户扣减成功",null);
    }
}
